Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to the new pull request button #6248

Closed
wants to merge 51 commits into from
Closed

Fix to the new pull request button #6248

wants to merge 51 commits into from

Conversation

User00015
Copy link

Fixing an issue where the new pull request button was pointing to an incorrect repository.

To reproduce:

  1. Create a fresh new gitea
  2. Register as a new user, admin or otherwise.
  3. Create a new organization.
  4. Go to the organizations dashboard,
  5. Create a repository under that organization and initilize it
  6. Return to the organization dashboard and select the newly created repository
  7. Click the green new pull request icon

Expected Result:
You are taken to a branch-to-branch merge with the repository

Actual result:
You are taken to a non-existent fork that assumes to exist that leads to a 404

0x5c and others added 30 commits January 3, 2019 18:53
[https-setup]
- Made it clearer that HTTP redirection is possible
[config-cheat-sheet]
- Clarified the behavihour of the redirection-related config keys

Signed-off-by: Matti Ranta <matti@mdranta.net>
… (#5635)

This commit wraps more of the TreePaths with cleanUploadFileName

Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fix sqlite deadlock when assigning to a PR

Fix 5639

Signed-off-by: Andrew Thornton <art27@cantab.net>

* More possible deadlocks found and fixed

Signed-off-by: Andrew Thornton <art27@cantab.net>
Adds a small check to close the issues only if the referencing commits
are on the default branch.

Fixes: #2314.
)

Signed-off-by: Julian Tölle <julian.toelle97@gmail.com>
Signed-off-by: Julian Tölle <julian.toelle97@gmail.com>
* Do not display the raw OpenID error in the UI

If there are no `WHITELIST_URIS` or `BLACKLIST_URIS` set in the openid
section of the app.ini, it is possible that gitea can leak sensitive
information about the local network through the error provided by the
UI. This PR hides the error information and logs it.

Fix #4973

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update auth_openid.go

Place error log within the `err != nil` branch.
…5716)

Signed-off-by: Julian Tölle <julian.toelle97@gmail.com>
* add util method and tests

* make sure the title of an issue cannot be empty

* wiki title cannot be empty

* pull request title cannot be empty

* update to make use of the new util methof
* Update go-ldap dependency

* Request for public keys only if attribute is set
* Include Go version

* fix import order
* Added docs for the tree api

* Updated swagger docs

* Added missing response definition

* Updated swagger docs

* Fixed swagger docs
)

Backport of #5872 to v1.7

Signed-off-by: Andrew Thornton <art27@cantab.net>
…) (#5894)

* Ensure issue.Poster is loaded in mailIssueCommentToParticipants (#5891)

Previous code could potentially dereference nil - this PR ensures
that the poster is loaded before dereferencing it.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Also ensure the repo is loaded

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix bug when read public repo lfs file

* add comment on lfs permission check
techknowlogick and others added 19 commits January 31, 2019 10:07
Signed-off-by: jolheiser <john.olheiser@gmail.com>
…ment variables (#5935) (#5944)

The gitea prerecieve and postrecieve hooks and the gitea PushUpdate function require that the PusherID and PusherName are real users. Previously, these environment variables were not being set when using a deploy key - the main result being that pushing to empty repositories meant that is_empty status was not changed.

I've also added an integration test to ensure that the is_empty status is updated on pushing with a deploy key.

There is a slight issue in that the deploy key is now considered a proxy for the owner - we don't have a way of separating out the deploy key from the owner at present. This can be fixed in another PR.

Fix #3795 

Signed-off-by: Andrew Thornton art27@cantab.net
By default, if `setting.NewContext()` prints out any warning logs, these are printed to the stdout breaking `git receive-pack` etc. meaning that even if there is a warning because of a minor problem in your app.ini but gitea starts despite this - you **CANNOT** push or pull over SSH.

This PR disables the console logger whilst in `serv.go`

Signed-off-by: Andrew Thornton <art27@cantab.net>
Backport of #5939 

1. A key can either be an ssh user key or a deploy key. It cannot be both.
2. If a key is a user key - it can only be associated with one user.
3. If a key is a deploy key - it can be used in multiple repositories and the permissions it has on those repositories can be different.
4. If a repository is deleted, its deploy keys must be deleted too.

We currently don't enforce any of this and multiple repositories access with different permissions doesn't work at all. This PR enforces the following constraints:

- [x] You should not be able to add the same user key as another user
- [x] You should not be able to add a ssh user key which is being used as a deploy key
- [x] You should not be able to add a ssh deploy key which is being used as a user key
- [x] If you add an ssh deploy key to another repository you should be able to use it in different modes without losing the ability to use it in the other mode.
- [x] If you delete a repository you must delete all its deploy keys.

Fix #1357
Backport of #6006 

Signed-off-by: Pauls Barkans <paulsb@gmail.com>
…#6048)

* Create repository on organisation by default on its dashboard
* Only show owners the add new repositories to an organisation button.

Fix #3253

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Check first if user/password is a token

* In basic auth check if user/password is a token

* Remove unnecessary else statement

* Changes of fmt
.gitignore Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 5, 2019
Copy link
Author

@User00015 User00015 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@lunny lunny added the type/bug label Mar 5, 2019
@silverwind
Copy link
Member

Removed.

Diff still shows a newline added, you might want to remove it :)

Copy link
Author

@User00015 User00015 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed for real this time.

@Piraty
Copy link

Piraty commented Mar 18, 2019

please squash the commits and give it an appropriate comment

Copy link
Contributor

@zeripath zeripath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to squash commits - we squash them on merging.

templates/repo/home.tmpl Outdated Show resolved Hide resolved
modules/context/repo.go Outdated Show resolved Hide resolved
@User00015 User00015 closed this Mar 27, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet